package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created by IntelliJ IDEA.
 * User: dixithk
 * Date: 6/18/14
 * Time: 10:52 AM
 * To change this template use File | Settings | File Templates.
 */
public class ListAllBooks implements MenuOperations {
    UserInterface ui = new UserInterfaceApp();
    Library lib = new Library();

    public ListAllBooks(UserInterface Ui , Library lib)
    {
        this.ui = Ui;
        this.lib = lib;

    }

    @Override
    public Result action()
    {



        ArrayList<Book> listOfAvailableBooks = lib.getBooks();
        ui.printBooks(listOfAvailableBooks);




        return new Result("Listed Books\n", true);
    }

    public String getName()
    {
        return "List of Books";

    }



}
